﻿<phone:PhoneApplicationPage 
    x:Class="MatchResults.ResultShow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">

        <!--Pivot Control-->
        <controls:Pivot x:Name="pivotPage" Title="Maç Sonuçları">
            <controls:Pivot.Background>
                <ImageBrush ImageSource="PanoramaBackground.png"/>
            </controls:Pivot.Background>
            <!--Pivot item one-->
            <controls:PivotItem Header="Puan Durumu" >
                <Grid>
                    <ListBox x:Name="grdStandingTable">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition></RowDefinition>
                                        <RowDefinition></RowDefinition>
                                        <RowDefinition></RowDefinition>
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="80"  />
                                        <ColumnDefinition Width="80"  />
                                        <ColumnDefinition Width="80" />
                                        <ColumnDefinition Width="80" />
                                        <ColumnDefinition Width="80" />
                                        <ColumnDefinition Width="80" />
                                        <ColumnDefinition Width="80" />
                                        <ColumnDefinition Width="80" />
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Text="{Binding Path=TEAMNAME_TR}" Grid.Row="0" Grid.ColumnSpan="4" />
                                    <TextBlock Text="O" Grid.Row="1" Grid.Column="0" />
                                    <TextBlock Text="G" Grid.Row="1" Grid.Column="1" />
                                    <TextBlock Text="B" Grid.Row="1" Grid.Column="2" />
                                    <TextBlock Text="M" Grid.Row="1" Grid.Column="3" />
                                    <TextBlock Text="A" Grid.Row="1" Grid.Column="4" />
                                    <TextBlock Text="Y" Grid.Row="1" Grid.Column="5" />
                                    <TextBlock Text="P" Grid.Row="1" Grid.Column="6" />
                                    <TextBlock Text="Av." Grid.Row="1" Grid.Column="7" />
                                    <TextBlock Text="{Binding Path=MATCHPLAYED}" Grid.Row="2" Grid.Column="0" />
                                    <TextBlock Text="{Binding Path=WON}" Grid.Row="2" Grid.Column="1" />
                                    <TextBlock Text="{Binding Path=DRAWN}" Grid.Row="2" Grid.Column="2" />
                                    <TextBlock Text="{Binding Path=LOST}" Grid.Row="2" Grid.Column="3" />
                                    <TextBlock Text="{Binding Path=GOALSFOR}" Grid.Row="2" Grid.Column="4" />
                                    <TextBlock Text="{Binding Path=GOALSAGAINST}" Grid.Row="2" Grid.Column="5" />
                                    <TextBlock Text="{Binding Path=TOTALSCORE}" Grid.Row="2" Grid.Column="6" />
                                    <TextBlock Text="{Binding Path=AVERAGE}" Grid.Row="2" Grid.Column="7" />
                                </Grid>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </Grid>
            </controls:PivotItem>

            <!--Pivot item two-->
            <controls:PivotItem Header="Maç Programı" >
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="60"></RowDefinition>
                        <RowDefinition></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <!--<ColumnDefinition Width="50"  />-->
                        <ColumnDefinition Width="50"  />
                        <ColumnDefinition Width="120"  />
                        <ColumnDefinition Width="50" />
                        <ColumnDefinition Width="120" />
                        <ColumnDefinition Width="110" />
                    </Grid.ColumnDefinitions>
                    <!--<TextBlock Text="Maç Türü" Grid.Row="0" Grid.Column="0" TextWrapping="Wrap"/>-->
                    <TextBlock Text="Tur/Hafta" Grid.Row="0" Grid.Column="0"  TextWrapping="Wrap"/>
                    <TextBlock Text="Ev Sahibi" Grid.Row="0" Grid.Column="1" TextWrapping="Wrap"  />
                    <TextBlock Text="Skor" Grid.Row="0" Grid.Column="2" TextWrapping="Wrap"/>
                    <TextBlock Text="Deplasman" Grid.Row="0" Grid.Column="3" TextWrapping="Wrap" />
                    <TextBlock Text="Maç Zamanı" Grid.Row="0" Grid.Column="4" />
                    <ListBox x:Name="grdMatchList" Grid.Row="1" Grid.ColumnSpan="6">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="60"></RowDefinition>
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <!--<ColumnDefinition Width="50"  />-->
                                        <ColumnDefinition Width="50"  />
                                        <ColumnDefinition Width="110" />
                                        <ColumnDefinition Width="50" />
                                        <ColumnDefinition Width="110" />
                                        <ColumnDefinition Width="100" />
                                    </Grid.ColumnDefinitions>
                                    
                                    <!--<TextBlock Text="{Binding Path=MATCHTYPENAMESHORT_TR}"  Grid.Column="0" TextWrapping="Wrap"/>-->
                                    <TextBlock Text="{Binding Path=TOURNAMESHORT_TR}"  Grid.Column="0" TextWrapping="Wrap"/>
                                    <TextBlock Text="{Binding Path=TEAM1NAMESHORT_TR}" Grid.Column="1" TextWrapping="Wrap"/>
                                    <TextBlock Text="{Binding Path=CalculatedScore}"  Grid.Column="2" TextWrapping="Wrap"/>
                                    <TextBlock Text="{Binding Path=TEAM2NAMESHORT_TR}"  Grid.Column="3" TextWrapping="Wrap"/>
                                    <TextBlock Text="{Binding Path=MATCHTIME}"  Grid.Column="4" TextWrapping="Wrap"/>
                                </Grid>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </Grid>
            </controls:PivotItem>

            <controls:PivotItem Header="Gol Krallığı" >
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="60"></RowDefinition>
                        <RowDefinition></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="50"  />
                        <ColumnDefinition Width="350"  />
                        <ColumnDefinition Width="50" />
                    </Grid.ColumnDefinitions>
                    <TextBlock Text="Oyuncu" Grid.Row="0" Grid.Column="1" TextWrapping="Wrap"  />
                    <TextBlock Text="Gol" Grid.Row="0" Grid.Column="2" TextWrapping="Wrap"/>
                    <ListBox x:Name="grdTopScorers" Grid.Row="1" Grid.ColumnSpan="3">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition ></RowDefinition>
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="50"  />
                                        <ColumnDefinition Width="350"  />
                                        <ColumnDefinition Width="50" />
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Text="{Binding Path=RowNo}" Grid.Column="0" TextWrapping="Wrap"/>
                                    <TextBlock Text="{Binding Path=NAME_TR}" Grid.Column="1" TextWrapping="Wrap"/>
                                    <TextBlock Text="{Binding Path=GOALCOUNT}"  Grid.Column="2" TextWrapping="Wrap"/>
                                  
                                </Grid>
                            </DataTemplate>
                            </ListBox.ItemTemplate>
                    </ListBox>
                </Grid>
            </controls:PivotItem>
        </controls:Pivot>
    </Grid>
</phone:PhoneApplicationPage>